<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>火输文本编辑器 - 颜色板</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <script type="text/javascript">
       function selectColor(color)
       {
           var command = parent.document.getElementById("colorpalette").getAttribute("command"); 
           parent.document.getElementById("fireinputEditor").contentDocument.execCommand(command, false, color);
           parent.document.getElementById("colorpalette").style.display="none"; 
           parent.document.getElementById("fireinputEditor").contentWindow.focus();
       }

       function InitColorPalette() 
       {
           var x;
           if (document.getElementsByTagName)
              x = document.getElementsByTagName('TD');
           else if (document.all)
              x = document.all.tags('TD');
           for (var i=0;i<x.length;i++)
           {
              x[i].onmouseover = over;
              x[i].onmouseout = out;
              x[i].onclick = click;
           }
      }

      function over()
      {
           if(this.id == "#FFFFFF")
              this.style.border='2px dotted black';
           else
              this.style.border='2px dotted white'; 

           document.getElementById("colorid").textContent = this.id; 
      }

      function out()
      {
           this.style.border='1px solid gray';
      }

      function click()
      {
           selectColor(this.id);
      }
    </script>
</head>
<body bgcolor="white" onLoad="InitColorPalette()">
<TABLE border="1" cellpadding="1" cellspacing="1">
<TR>
<TD id="#FFFFFF" bgcolor="#FFFFFF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFCCCC" bgcolor="#FFCCCC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFCC99" bgcolor="#FFCC99" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFFF99" bgcolor="#FFFF99" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFFFCC" bgcolor="#FFFFCC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#99FF99" bgcolor="#99FF99" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#99FFFF" bgcolor="#99FFFF" width="20" height="20"><img width="1" height="1"></TD>

<TD id="#CCFFFF" bgcolor="#CCFFFF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#CCCCFF" bgcolor="#CCCCFF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFCCFF" bgcolor="#FFCCFF" width="20" height="20"><img width="1" height="1"></TD>
</TR>
<TR>
<TD id="#CCCCCC" bgcolor="#CCCCCC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FF6666" bgcolor="#FF6666" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FF9966" bgcolor="#FF9966" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFFF66" bgcolor="#FFFF66" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFFF33" bgcolor="#FFFF33" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#66FF99" bgcolor="#66FF99" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#33FFFF" bgcolor="#33FFFF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#66FFFF" bgcolor="#66FFFF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#9999FF" bgcolor="#9999FF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FF99FF" bgcolor="#FF99FF" width="20" height="20"><img width="1" height="1"></TD>
</TR>
<TR>

<TD id="#C0C0C0" bgcolor="#C0C0C0" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FF0000" bgcolor="#FF0000" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FF9900" bgcolor="#FF9900" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFCC66" bgcolor="#FFCC66" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFFF00" bgcolor="#FFFF00" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#33FF33" bgcolor="#33FF33" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#66CCCC" bgcolor="#66CCCC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#33CCFF" bgcolor="#33CCFF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#6666CC" bgcolor="#6666CC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#CC66CC" bgcolor="#CC66CC" width="20" height="20"><img width="1" height="1"></TD>
</TR>
<TR>
<TD id="#999999" bgcolor="#999999" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#CC0000" bgcolor="#CC0000" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FF6600" bgcolor="#FF6600" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFCC33" bgcolor="#FFCC33" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#FFCC00" bgcolor="#FFCC00" width="20" height="20"><img width="1" height="1"></TD>

<TD id="#33CC00" bgcolor="#33CC00" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#00CCCC" bgcolor="#00CCCC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#3366FF" bgcolor="#3366FF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#6633FF" bgcolor="#6633FF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#CC33CC" bgcolor="#CC33CC" width="20" height="20"><img width="1" height="1"></TD>
</TR>
<TR>
<TD id="#666666" bgcolor="#666666" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#990000" bgcolor="#990000" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#CC6600" bgcolor="#CC6600" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#CC9933" bgcolor="#CC9933" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#999900" bgcolor="#999900" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#009900" bgcolor="#009900" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#339999" bgcolor="#339999" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#3333FF" bgcolor="#3333FF" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#6600CC" bgcolor="#6600CC" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#993399" bgcolor="#993399" width="20" height="20"><img width="1" height="1"></TD>

</TR>
<TR>
<TD id="#333333" bgcolor="#333333" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#660000" bgcolor="#660000" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#993300" bgcolor="#993300" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#996633" bgcolor="#996633" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#666600" bgcolor="#666600" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#006600" bgcolor="#006600" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#336666" bgcolor="#336666" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#000099" bgcolor="#000099" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#333399" bgcolor="#333399" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#663366" bgcolor="#663366" width="20" height="20"><img width="1" height="1"></TD>
</TR>
<tr>
<TD id="#000000" bgcolor="#000000" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#330000" bgcolor="#330000" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#663300" bgcolor="#663300" width="20" height="20"><img width="1" height="1"></TD>

<TD id="#663333" bgcolor="#663333" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#333300" bgcolor="#333300" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#003300" bgcolor="#003300" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#003333" bgcolor="#003333" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#000066" bgcolor="#000066" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#330099" bgcolor="#330099" width="20" height="20"><img width="1" height="1"></TD>
<TD id="#330033" bgcolor="#330033" width="20" height="20"><img width="1" height="1"></TD>
</tr>
</TABLE>
<div id="colorid" style="height:10px; margin: 5px 0px;"></div>
</BODY>
</HTML>

